<template>
    <div class="page-header">
        <div class="left-back" v-show="showBack" @click="$router.back()">
            <span class="iconfont icon-zuo"></span>
            返回
        </div>
        <span class="title-text">{{title}}</span>
        <div class="right-menu">
            <span class="iconfont icon-user" v-show="!$store.state.isLogin" @click="$router.push({name:'Login'})"></span>
        </div>
    </div>
</template>

<script>
export default {
    name:'PageHeader',
    props:{
        title:{
            type:String,
            default:'软帝点餐'
        },
        showBack:{
            type:Boolean,
            default:true
        }
    },
    setup () {
        return {}
    }
}
</script>

<style lang="scss" scoped>
.page-header{
  @include flexbox(row,center,center);
  height: 45px;
  display: flex;
  justify-content: center;
  background-color: #ee87a9;
  color: white;
  .left-back{

  }
  .title-text{

  }
  .right-menu{

  }
}

</style>